cmake_minimum_required(VERSION 3.5.1)
project(deepsort_plugin)

add_compile_options(-std=c++11 -O3 -Wall)

if (WITH_CROSS_COMPILE)
    message("cross compile")
    set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++")
    set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
    set(LIBRARY_OUTPUT_PATH ../../cross_compiled_lib)

    include_directories("/usr/local/lynxi/sdk/include/lyn_api/" 
                        ../osd/inc/carPlatePostProcess 
                        ../util 
                        ../../../cpp)

    file(GLOB CPP_FILES "${PROJECT_SOURCE_DIR}/src/*.cpp")
    add_library(DeepsortPlugin SHARED ${CPP_FILES})
    target_include_directories(DeepsortPlugin PRIVATE inc/eigen3 inc/)
else()
    message("not compile deepsort plugin")
endif()